package gen_cmd

import (
	"learning/gooop/spring/autogen/command"
)

// GenCmd calls service.Gen() to generate enhanced code files at once
type GenCmd int

// GenCmdBuilder parse cli input and try to build a GenCmd instance
type GenCmdBuilder int

const gGenCmdString = "gen"

var gGenCmdSingleton = new(GenCmd)

func (me *GenCmd) String() string {
	return gGenCmdString
}

func (me *GenCmd) Apply(c command.ICmdContext) error {
	panic("implements me")
}

func (me *GenCmdBuilder) Build(line string) (error, command.ICmd) {
	if line != gGenCmdString {
		return nil, nil
	}

	return nil, gGenCmdSingleton
}
